package com.example.demo.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.NotBlank;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @Author zhengmf
 * @Date 2018/12/27  17:32
 */
@Entity
@Table(name = "CS_SM_SYS_CONFIG_C")
@ApiModel("系统常量配置")
public class SystemConfig implements Serializable {
    private static final long serialVersionUID = -8101291454726018729L;
    @Id
    @Column(name = "CS_SM_SYS_CONFIG_ID")
    @SequenceGenerator(name = "SYS_CONFIG_SEQ", sequenceName = "S_SM_SYS_CONFIG", allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "SYS_CONFIG_SEQ")
    @ApiModelProperty("ID")
    private Long id;

    @Column(name = "CONFIG_KEY")
    @ApiModelProperty("key值")
    @NotBlank
    private String key;

    @Column(name = "CONFIG_VALUE")
    @ApiModelProperty("值")
    @NotBlank
    private String value;

    @Column(name = "CONFIG_DESC")
    @ApiModelProperty("描述")
    private String desc;

    @Column(name = "STATUS")
    @ApiModelProperty("状态")
    @NotBlank
    private String status;

   /* @ApiModelProperty("是否可用")
    @Column(name = "SM_SYS_CONFIG_ENABLE")
    @NotNull
    private Integer enable;*/

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "SystemConfig{" +
            "id=" + id +
            ", key='" + key + '\'' +
            ", value='" + value + '\'' +
            ", desc='" + desc + '\'' +
            ", status='" + status + '\'' +
            '}';
    }
}
